import 'package:flutter/material.dart';

import '../basic/container/aligment.dart';

class DemoContainer extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Contianer deom'),
      ),
      body: Column(
        children: <Widget>[
          Container(
            decoration: const BoxDecoration(
              image: DecorationImage(
                  image: NetworkImage('https://desk-fd.zol-img.com.cn/t_s208x130c5/g5/M00/06/08/ChMkJ1ZXvYuIBgwTAAS3zVB-lRIAAFZcgEg_uUABLfl181.jpg'),
                ),
            ),
            child: const AligmentContainer(
              child: Text('后背景'),
              dir: 'topLeft',
            ),
          ),
          Container(
            color: Colors.teal.shade700,
            foregroundDecoration: const BoxDecoration(
              image: DecorationImage(
                  image: NetworkImage('https://desk-fd.zol-img.com.cn/t_s208x130c5/g5/M00/06/08/ChMkJ1ZXvYuIBgwTAAS3zVB-lRIAAFZcgEg_uUABLfl181.jpg'),
                ),
            ),
            child: const AligmentContainer(
              child: Text('前背景'),
              dir: 'topLeft',
            ),
          ),
        ]
      )
    );
  }
}
